package com.example.springboot.mapper;

import com.example.springboot.entity.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RoleMapper {
    @Select("SELECT * from sys_role")
    List<Role> findAll();

    @Select("SELECT role_name from sys_role where id = #{id}")
    String findById(@Param("id")Integer id);

}
